package com.kele.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * @author chunhui.li
 * @date 2022/2/12 13:45
 * @Description
 * @ClassName TestMyStater
 */
@SpringBootApplication
public class TestMyStater {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(TestMyStater.class, args);

        Environment env = context.getBean(Environment.class);
        System.out.println("访问端口: => "+env.getProperty("server.port"));
    }
}
